home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 29
/
Volume 29 - JOGO DISK .iso
/
Games
/
jungle_adventure.swf
/
scripts
/
__Packages
/
MessageBox.as
< prev
next >
Wrap
Text File
|
2006-11-29
|
1KB
|
55 lines
class MessageBox extends SSObject
{
var classID = SSGlobal.CLSID_OBJECT;
var assetID = "MessageBox";
var message = "No Message!";
var messageTime = 10;
var showOnce = true;
var pauseOnDisplay = false;
var showTime = 0;
var editor_isItem = true;
var editor_name = "MessageBox";
var editor_args_names = ["message"];
var editor_args_values = [MessageBox.prototype.message];
var editor_args_types = ["string"];
var editor_args_options = [null];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["TextInput"];
function MessageBox(message)
{
super();
if(message != null)
{
this.message = message;
}
}
function onCollision(obj)
{
this.show();
}
function show()
{
if(this.showTime && this.showTime + 2 > this.world.time)
{
return undefined;
}
this.showTime = this.world.time;
SSInterface.showScreen("Message");
SSInterface.target.message = this.message;
Key.addListener(this);
}
function hide()
{
SSInterface.hide();
Key.removeListener(this);
}
function onKeyUp()
{
if(Key.getCode() == 32)
{
this.hide();
}
}
}